package cn.edu.scau.cmi.chensicheng.factory;

import cn.edu.scau.cmi.chensicheng.domain.BodyInjuryInsurance;
import cn.edu.scau.cmi.chensicheng.domain.CarInjuryInsurance;
import cn.edu.scau.cmi.chensicheng.domain.CasualtyInsurance;
import cn.edu.scau.cmi.chensicheng.domain.Insurance;
import cn.edu.scau.cmi.chensicheng.domain.MultipleAccidentsInsurance;

public class InsuranceFactory {
	public static final Insurance getInstance(String insuranceTypeString) {
		switch (insuranceTypeString) {
		case "司机受伤":
			return new BodyInjuryInsurance();
		case "汽车损坏":
			return new CarInjuryInsurance();
		case "人员伤亡":
			return new CasualtyInsurance();
		case "多种事故":
			return new MultipleAccidentsInsurance();
		default:
			return null;
		}
	}
}
